commit 21607fa8c52972199e983f27d3b37a5a54144fc7
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date:   Thu Sep 3 15:46:37 2009 +0000

    Check for __attribute__((visibility("hidden"))).

diff --git a/configure.ac b/configure.ac
index 1358253..834b9c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,6 +118,30 @@ if test x$libudev = xno; then
 fi
 AM_CONDITIONAL(BUILD_DUMMY_BACKEND, test x$enable_dummy_backend = xyes)
 
+dnl Check for __attribute__((visibility()))
+AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
+    libva_cv_visibility_attribute,
+    [cat > conftest.c <<EOF
+int foo __attribute__ ((visibility ("hidden"))) = 1;
+int bar __attribute__ ((visibility ("protected"))) = 1;
+EOF
+    libva_cv_visibility_attribute=no
+    if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
+        if grep '\.hidden.*foo' conftest.s >/dev/null; then
+            if grep '\.protected.*bar' conftest.s >/dev/null; then
+	       libva_cv_visibility_attribute=yes
+            fi
+        fi
+    fi
+    rm -f conftest.[cs]
+])
+ATTRIBUTE_HIDDEN=""
+if test $libva_cv_visibility_attribute = yes; then
+    ATTRIBUTE_HIDDEN="__attribute__((visibility(\"hidden\")))"
+fi
+AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN],
+    [Defined to __attribute__((visibility("hidden"))) when available])
+
 # Check for OpenGL (X11)
 USE_GLX="no"
 GL_DEPS_CFLAGS=""
